package com.esri.core.tasks.ags.geoprocessing;

import com.esri.core.internal.util.d;
import com.esri.core.io.EsriServiceException;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class GPMessage {
    private String description;
    private String type;

    public String getType() {
        return this.type;
    }

    public String getDescription() {
        return this.description;
    }

    public void setType(String str) {
        this.type = str;
    }

    public void setDescription(String str) {
        this.description = str;
    }

    public static GPMessage fromJson(JsonParser jsonParser) throws Exception {
        if (!d.c(jsonParser)) {
            throw new EsriServiceException("Unable to parse the Response for this GPJobParameter.");
        }
        GPMessage gPMessage = new GPMessage();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String currentName = jsonParser.getCurrentName();
            jsonParser.nextToken();
            if ("type".equals(currentName)) {
                gPMessage.type = jsonParser.getText();
            } else if ("description".equals(currentName)) {
                gPMessage.description = jsonParser.getText();
            } else {
                jsonParser.skipChildren();
            }
        }
        return gPMessage;
    }
}
